package com.study.controller;

import com.study.entity.Book;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @desc:
 * @author: panxiyi
 * @date: 2023/4/19 12:18 下午
 */

@RestController
@RequestMapping("/books")
public class BookController {

//    @RequestMapping
//    public String getById() {
//        System.out.println("getById is running...");
//        return "book get ok";
//    }

    @RequestMapping
    public Book getBookById() {
        System.out.println("getBook is running...");
        return new Book(1, "aa", "bb", "cc");
    }
}
